*Replication Instructions for Public Support for Power-grabbing after Civil Conflict

*Below are instructions for replicating all manuscript and online appendix tables and figures in STATA using the dataset “SS_Powergrabbing_replicationdata.dta”. 
*Please contact Sam Whitt (swhitt@highpoint.edu) for questions regarding data replication.  

*Note: You may need to install STATA packages for the cibar and catcibar command. Use findit with the command name to identify and download the appropriate packets to install. 

*Note: In addition, some graphs require additional formatting using filename.grec files with the graph play command. 
*To format a graph, simply run the command to generate the graph in the do file in STATA, then open the “Graph Editor” in STATA and click on the GREEN
*“Play Recording” button, then select “Browse” to select the grec file from the folder “grec files for STATA graph formatting” among Replication files.
*The name of the grec file is indicated in the note below the graph command in the do file for the specific graph you wish to format. 
*This should automatically format the graph, which you may then save to a location of your choosing.

*Manuscript Replication

*Replication in Text

*“The average number of respondents sampled in each neighborhood was 22.8 (SD = 10.5) across 21 neighborhoods in Mosul.”

sum locale 

*“The average respondent is 30 years old (ranging from 18-60) and has completed secondary education. 
*A quarter of the sample is unemployed, and 16% of the sample cannot meet basic living expenses. 
*The sample is almost entirely Arab and Sunni Muslim.”

sum age 
sum education 
tab education 
tab unemployed 
tab income 
tab ethnicity 
tab religion 

*“We begin with a pre-treatment analysis of the dependent variable. All respondents were asked “Do you expect the following in Mosul to get better, 
*stay the same, or become worse over the next 12 months?” on items related to security, crime, policing, and the economy with response options ranging
*from 1 = become a lot worse to 5 = become a lot better.”

*Principal component factor analysis indicates that responses to each of the four security-related items line up strongly on a single dimension in 
*Mosul (see appendix for results), suggesting that the items are all capturing a latent security variable. 
*To simplify the analysis, we create a combined latent security index based on the interim covariance of all four items and report the results for each index component in the appendix.”

*To generate the security index DV (results are consistent using factor analysis to generate DV)
*alpha revpresecurity revprecriminal revprepolicing revpreeconomy, gen (revprealpha)
*alpha revpostsecurity revpostcriminal revpostpolicing revposteconomy, gen (revpostalpha)
*factor revpresecurity revprecriminal revprepolicing revpreeconomy
*predict(revprefactor)
*factor revpostsecurity revpostcriminal revpostpolicing revposteconomy
*predict(revpostfactor)

*“In general, pre-treatment expectations of future security are in the cautiously positive direction (mean=3.89)”

sum revprealpha 

*“Consistent with H1, respondents view same-sided power-grabbing as security-enhancing. 
*The Local police power-grabbing treatment (mean=3.96) produces better security expectations than power-sharing (mean=3.20).”

tab txt2
sum revpostalpha if txt2==2
sum revpostalpha if txt2==1

*“In fact, security expectations in Mosul under the power-sharing treatment actually drop below the pre-treatment baseline (mean=3.89), 
*indicating how simply informing people about the status quo security conditions, which respondents may not have been aware of, has a small negative impact.”

sum revprealpha 

*“Our results also lend support to the security-reducing effects of opposing-sided power-grabs. 
*Respondents reject opposing-sided power grabs, as suggested by H1. They react negatively 
*to both Hashd power-grabbing (mean=3.08) and the status quo power-sharing treatment (mean=3.20) relative to Local Police power-grabbing (mean=3.96).”

sum revpostalpha if txt2==3
sum revpostalpha if txt2==1
sum revpostalpha if txt2==2

*“…the local police power-grab treatment (the in-group treatment) has a strong, positive effect on security expectations, as H1 would lead us to expect (Cohen’s d=0.93).” 

*Cohen’s d for local police power grab txt relative to power-sharing

cohend revpostalpha localpolicepgtxt if hashdpgtxt~=1

*“…individual security expectations in the Hashd power-grabbing and power-sharing treatments decline following treatment (Cohen’s d=-0.97 and -1.12 respectively), consistent with H1 and the visual representations in Figure 1.”

*Cohen’s d for the change in security expectations in the local police power grab treatment relative to power-sharing and the hashd power grab treatment. 

cohend revdalpha localpolicepgtxt if hashdpgtxt~=1
cohend revdalpha localpolicepgtxt if powersharetxt~=1

*“Figure 2 indicates that nearly half of the sample (47%) reported punishment by ISIS during the 2014-2017 period of ISIS rule.”

tab punishedisis 

*“Less than 10% also reported having family members injured, killed, or imprisoned by ISIS or having their homes and property confiscated by ISIS during that time.”

sum fampunishedisis injuredisis faminjuredisis famkilledisis imprisonedisis fleehomeisis lootedisis 

*“More respondents claim victimization by ISIS during the 2017 liberation in the form of personal injury (39%), being detained/imprisoned by ISIS (34%), 
*family members being injured (39%) or killed (37%), homes damaged or destroyed (27%), property looted (42%), and 36% reported that women in their families 
*were abused or assaulted by ISIS.”

sum injuredlibisis imprisonedlibisis faminjuredlibisis famkilledlibisis homedestroyedlibisis lootedlibisis womenabusedlibisis  

*“Fewer than 5% indicated victimization by the Iraqi army, although 8% reported being wounded and 16% reported homes being damaged or destroyed during coalition airstrikes.”

sum injuredlibarmy homedestroyedlibarmy imprisonedlibarmy lootedlibarmy 

sum injuredlibair faminjuredlibair famkilledlibair homedestroyedlibair fleehomelibair 

*“Finally, we identify 24% of our sample who experienced both victimization by ISIS (during or before liberation) as well as victimization by the Iraqi military during liberation.”

tab crossfire

*Manuscript Table 1

tab txt 
sum ib2.txt 
sum i.txt 
sum gender age education ib2.typeofwork ib2.income ib2.religion ib2.ethnicity 
sum gender age education i.typeofwork i.income i.religion i.ethnicity 

*Manuscript Figure 1

*To install the catcibar command enter the following:
*net install catcibar, from("https://aarondwolf.github.io/catcibar") 
catcibar revprealpha revpostalpha, by(txt2)
*Note additional formatting requires the "Figure 1 formatting.grec" file with the command graph play "Figure 1 formatting.grec"
 
*Manuscript Table 2

ttest revprealpha = revpostalpha if txt2==3
ttest revprealpha = revpostalpha if txt2==2
ttest revprealpha = revpostalpha if txt2==1

*For the standard deviation of the mean difference 

sum revdalpha if txt2==1
sum revdalpha if txt2==2
sum revdalpha if txt2==3

*Manuscript Table 3a

reg revpostalpha i.txt2 , robust
reg revpostalpha i.txt2 gender age education unemployed income i.religion i.ethnicity , robust

*Manuscript Table 3b

reg revdalpha ib2.txt2, robust

*Manuscript Figure 2

graph bar punishedisis fampunishedisis injuredisis faminjuredisis famkilledisis imprisonedisis fleehomeisis lootedisis womenabusedisis , showyvars horizontal blabel(bar, format(%4.2f)) saving(g1, replace)

graph bar injuredlibisis faminjuredlibisis famkilledlibisis homedestroyedlibisis imprisonedlibisis fleehomelibisis lootedlibisis womenabusedlibisis , showyvars horizontal blabel(bar, format(%4.2f)) saving(g2, replace)
graph bar injuredlibarmy homedestroyedlibarmy imprisonedlibarmy lootedlibarmy , showyvars horizontal blabel(bar, format(%4.2f)) saving(g3, replace)
graph bar injuredlibair faminjuredlibair famkilledlibair homedestroyedlibair fleehomelibair  , showyvars horizontal blabel(bar, format(%4.2f)) saving(g4, replace)
graph combine "g1.gph" "g2.gph" "g3.gph" "g4.gph"
*Note additional formatting requires the "Figure 2 formatting.grec" file with the command graph play "Figure 2 formatting.grec"

*Code for Generating Victimization Indices

*ISIS Victimization (2014-2017)

*gen addvictimisis =  punishedisis + fampunishedisis + injuredisis + faminjuredisis + famkilledisis + imprisonedisis + fleehomeisis + lootedisis + womenabusedisis

*ISIS Victimization (Liberation)

*gen addvictimlibisis = injuredlibisis + faminjuredlibisis + famkilledlibisis + homedestroyedlibisis + imprisonedlibisis + fleehomelibisis + lootedlibisis + womenabusedlibisis 

*Iraqi Airstrike Victimization (Liberation)

*gen addvictimair =  injuredlibair + faminjuredlibair + famkilledlibair + homedestroyedlibair + fleehomelibair

*Crossfire Victimization

*gen addvictimisisall =  punishedisis + fampunishedisis + injuredisis + faminjuredisis + famkilledisis + imprisonedisis + fleehomeisis + lootedisis + womenabusedisis + injuredlibisis + faminjuredlibisis + famkilledlibisis + homedestroyedlibisis + imprisonedlibisis + fleehomelibisis + lootedlibisis + womenabusedlibisis

*gen crossfire = 0 if addvictimisisall ==0 | addvictimair==0
*replace crossfire = 1 if addvictimisisall>0 & addvictimair>0 & prepost~=.


*Manuscript Table 4

reg revpostalpha ib3.txt , robust
reg revpostalpha ib3.txt##c.addvictimisis ib3.txt##c.addvictimlibisis , robust
reg revpostalpha  ib3.txt##c.addvictimair , robust
reg revpostalpha ib3.txt##crossfire , robust

*Manuscript Figure 3

reg revpostalpha ib3.txt##c.addvictimisis ib3.txt##c.addvictimlibisis , robust
margins ib3.txt, at(addvictimisis=(0 (1) 6))
marginsplot, saving(g5, replace)
margins ib3.txt, at(addvictimlibisis=(0 (1) 8))
marginsplot, saving(g6, replace)
reg revpostalpha  ib3.txt##c.addvictimair , robust
margins ib3.txt, at(addvictimair=(0 (1) 4))
marginsplot, saving(g7, replace)
reg revpostalpha ib3.txt##crossfire , robust
margins ib3.txt, at(crossfire=(0 1))
marginsplot, saving(g8, replace)

graph combine "g5.gph" "g6.gph" "g7.gph" "g8.gph"
*Note additional formatting requires the "Figure 3 formatting.grec" file with the command graph play "Figure 3 formatting.grec"

*Appendix Replication

*Appendix Figure 1. Fear across Treatment Groups

cibar afraid , over1(txt)
*Note additional formatting requires the "Figure 1 mosul fear bar.grec" file with the command graph play "Figure 1 mosul fear bar.grec"

*Appendix Figure 2. Emotions across Treatment Groups

graph box afraid angry happy sad worried satisfied, by(txt2)
*Note additional formatting requires the "Figure 2 mosul emotions.grec" file with the command graph play "Figure 2 mosul emotions.grec"

*Appendix Figure 3. Mean Pre-Treatment Security Concerns by Treatment Group

ssc install cibar
cibar revprealpha , over1(txt)
*Note additional formatting requires the "Figure 3 Mean Pre-txt security mosul.grec" file with the command graph play "Figure 3 Mean Pre-txt security mosul.grec"

*To replicate the table of means below the figure

sum revprealpha if txt==1 
sum revprealpha if txt==2 
sum revprealpha if txt==3

*Appendix Figure 4. Pre-treatment Security Assessment by Index Components

catcibar revpresecurity revprecriminal revprepolicing revpreeconomy 
*Note additional formatting requires the "Figure 4 Pre-txt security component means2.grec" file with the command graph play "Figure 4 Pre-txt security component means2.grec"

*Appendix Figure 5. Post-treatment Security Assessment by Index Components

catcibar revpostsecurity-revposteconomy , over(txt2)
*Note additional formatting requires the "Figure 5 Post-txt security component means2.grec" file with the command graph play "Figure 5 Post-txt security component means2.grec"

*Principal Component Factor Analysis on Security Index

factor revpresecurity revprecriminal revprepolicing revpreeconomy
factor revpostsecurity revpostcriminal revpostpolicing revposteconomy

*Robustness Checks for MS Table 3 

*MS Table 3a using OLS with clustered standard errors at the neighborhood level

reg revpostalpha i.txt2 , cluster(locale)
reg revpostalpha i.txt2 gender age education unemployed income i.religion i.ethnicity , cluster(locale)

*MS Table 3b using OLS, Ordered Probit with clustered standard errors at the neighborhood level

reg revdalpha ib2.txt2, cluster(locale)
oprobit revdalpha ib2.txt2, cluster(locale)

*Demographic Balance Tests Across Treatment Groups

*Kolmogorov-Smirnov Balance Tests

ksmirnov gender, by(powersharetxt)
ksmirnov age, by(powersharetxt)
ksmirnov education, by(powersharetxt)
ksmirnov income, by(powersharetxt)
ksmirnov ethnicity, by(powersharetxt)
ksmirnov religion, by(powersharetxt)

ksmirnov gender, by(hashdpgtxt)
ksmirnov age, by(hashdpgtxt)
ksmirnov education, by(hashdpgtxt)
ksmirnov income, by(hashdpgtxt)
ksmirnov ethnicity, by(hashdpgtxt)
ksmirnov religion, by(hashdpgtxt)

ksmirnov gender, by(localpolicepgtxt)
ksmirnov age, by(localpolicepgtxt)
ksmirnov education, by(localpolicepgtxt)
ksmirnov income, by(localpolicepgtxt)
ksmirnov ethnicity, by(localpolicepgtxt)
ksmirnov religion, by(localpolicepgtxt)

*Post-Treatment Security Expectations with Coarsened Exact Matching (OLS Regression)
cem gender , treatment(powersharetxt)
reg revpostalpha i.txt2  [pweight=cem_weights], robust

cem age income , treatment(hashdpgtxt)
reg revpostalpha i.txt2  [pweight=cem_weights], robust

cem age income , treatment(localpolicepgtxt)
reg revpostalpha i.txt2  [pweight=cem_weights], robust

*Robustness Checks for MS Table 4 

*MS Table 4 (OLS with clustered standard errors at the neighborhood level)

reg revpostalpha ib3.txt , cluster(locale)
reg revpostalpha ib3.txt##c.addvictimisis ib3.txt##c.addvictimlibisis , cluster(locale)
reg revpostalpha  ib3.txt##c.addvictimair , cluster(locale)
reg revpostalpha ib3.txt##crossfire , cluster(locale)

*Table 4. Victimization as a Post-Treatment Moderator of Security Expectations (OLS Regression, extended controls)

reg revpostalpha ib3.txt gender age education unemployed income i.religion i.ethnicity , robust
reg revpostalpha ib3.txt##c.addvictimisis ib3.txt##c.addvictimlibisis gender age education unemployed income i.religion i.ethnicity , robust
reg revpostalpha  ib3.txt##c.addvictimair gender age education unemployed income i.religion i.ethnicity  , robust
reg revpostalpha ib3.txt##crossfire gender age education unemployed income i.religion i.ethnicity , robust

*Internal Validity of the Experiment

*Analysis of Power-sharing vs. Power-grabbing Treatment-Effect Covariates (OLS Regression)

reg revpostalpha ib3.txt , robust
reg revpostalpha ib3.txt revbaghdadpower revmosulpower revpowershare , robust

*Power-sharing/Power-grabbing Preferences and Security Expectations

reg revpostalpha ib3.txt , robust
reg revpostalpha ib3.txt revbaghdadpower , robust
reg revpostalpha ib3.txt revmosulpower , robust
reg revpostalpha ib3.txt revpowershare , robust

*Analysis of Other Potential Treatment Moderators/Covariates

*Demographic Correlates of Security

reg revpostalpha ib3.txt gender age education i.typeofwork income i.religion , robust

*Victimization during ISIS occupation (2014-2017)

sum punishedisis fampunishedisis injuredisis faminjuredisis famkilledisis imprisonedisis fleehomeisis lootedisis womenabusedisis 

*Factor Analysis of Victimization during ISIS Occupation

factor punishedisis fampunishedisis injuredisis faminjuredisis famkilledisis imprisonedisis fleehomeisis lootedisis womenabusedisis 

*Figure 6. ISIS Victimization Histogram

histogram addvictimisis , discrete percent addlabel

*ISIS Victimization and Treatment Effects (OLS regression)

reg revpostalpha ib3.txt , robust
reg revpostalpha ib3.txt i.punishedisis i.fampunishedisis i.injuredisis i.faminjuredisis i.famkilledisis i.imprisonedisis i.fleehomeisis i.lootedisis i.womenabusedisis , robust
reg revpostalpha ib3.txt addvictimisis , robust
reg revpostalpha ib3.txt##c.addvictimisis , robust

*Balance Tests on ISIS Victimization Pre-Liberation

ksmirnov punishedisis, by(powersharetxt)
ksmirnov fampunishedisis, by(powersharetxt)
ksmirnov injuredisis, by(powersharetxt)
ksmirnov faminjuredisis, by(powersharetxt)
ksmirnov famkilledisis, by(powersharetxt)
ksmirnov imprisonedisis, by(powersharetxt)
ksmirnov fleehomeisis, by(powersharetxt)
ksmirnov lootedisis, by(powersharetxt)
ksmirnov womenabusedisis, by(powersharetxt)

ksmirnov punishedisis, by(hashdpgtxt)
ksmirnov fampunishedisis, by(hashdpgtxt)
ksmirnov injuredisis, by(hashdpgtxt)
ksmirnov faminjuredisis, by(hashdpgtxt)
ksmirnov famkilledisis, by(hashdpgtxt)
ksmirnov imprisonedisis, by(hashdpgtxt)
ksmirnov fleehomeisis, by(hashdpgtxt)
ksmirnov lootedisis, by(hashdpgtxt)
ksmirnov womenabusedisis, by(hashdpgtxt)

ksmirnov punishedisis, by(localpolicepgtxt)
ksmirnov fampunishedisis, by(localpolicepgtxt)
ksmirnov injuredisis, by(localpolicepgtxt)
ksmirnov faminjuredisis, by(localpolicepgtxt)
ksmirnov famkilledisis, by(localpolicepgtxt)
ksmirnov imprisonedisis, by(localpolicepgtxt)
ksmirnov fleehomeisis, by(localpolicepgtxt)
ksmirnov lootedisis, by(localpolicepgtxt)
ksmirnov womenabusedisis, by(localpolicepgtxt)

*Figure 7. ISIS Victimization by Treatment

cibar addvictimisis, over1(txt2)
*Note additional formatting requires the "Figure 7 bar isis victimization by txt.grec" file with the command graph play " Figure 7 bar isis victimization by txt.grec"

*Treatment Effects With Coarsened Exact Matching on ISIS Victimization Pre-Liberation (OLS Regression)

cem punishedisis, treatment(localpolicepgtxt)
reg revpostalpha ib3.txt##c.addvictimisis [pweight=cem_weights], robust

cem addvictimisis, treatment(localpolicepgtxt)
reg revpostalpha ib3.txt##c.addvictimisis [pweight=cem_weights], robust

*Victimization during Liberation (2017)

sum i.injuredlib-womenabusedlib

*Factor Analysis of ISIS Victimization During Liberation
factor injuredlibisis-womenabusedlibisis

*Figure 8. ISIS Victimization During Liberation Histogram
histogram addvictimlibisis , discrete percent addlabel

*Factor Analysis of Victimization Due to Coalition Airstrikes
factor injuredlibair- fleehomelibair

*Figure 9. Airstrike Victimization During Liberation Histogram
histogram addvictimair , discrete percent addlabel

*Liberation Victimization and Treatment Effects (OLS regression)
*To generate the victimization variable:
*gen addvictimliball =  injuredlibisis + faminjuredlibisis + famkilledlibisis + homedestroyedlibisis + imprisonedlibisis + fleehomelibisis + lootedlibisis + womenabusedlibisis + injuredlibair + faminjuredlibair + famkilledlibair + homedestroyedlibair + fleehomelibair + lootedlibair + womenabusedlibair + injuredlibarmy + faminjuredlibarmy + famkilledlibarmy + homedestroyedlibarmy + imprisonedlibarmy + fleehomelibarmy + lootedlibarmy + womenabusedlibarmy

reg revpostalpha ib3.txt , robust
reg revpostalpha ib3.txt i.injuredlib i.faminjuredlib i.famkilledlib i.homedestroyedlib i.imprisonedlib i.fleehomelib i.lootedlib i.womenabusedlib, robust
reg revpostalpha ib3.txt addvictimliball, robust
reg revpostalpha ib3.txt##c.addvictimliball, robust

*Kolmogorov Smirnov Balance Tests on ISIS Victimization During Liberation

ksmirnov injuredlibisis, by(powersharetxt)
ksmirnov faminjuredlibisis, by(powersharetxt)
ksmirnov famkilledlibisis, by(powersharetxt)
ksmirnov imprisonedlibisis, by(powersharetxt)
ksmirnov fleehomelibisis, by(powersharetxt)
ksmirnov homedestroyedlibisis, by(powersharetxt)
ksmirnov womenabusedlibisis, by(powersharetxt)

ksmirnov injuredlibisis, by(hashdpgtxt)
ksmirnov faminjuredlibisis, by(hashdpgtxt)
ksmirnov famkilledlibisis, by(hashdpgtxt)
ksmirnov imprisonedlibisis, by(hashdpgtxt)
ksmirnov fleehomelibisis, by(hashdpgtxt)
ksmirnov homedestroyedlibisis, by(hashdpgtxt)
ksmirnov womenabusedlibisis, by(hashdpgtxt)

ksmirnov injuredlibisis, by(localpolicepgtxt)
ksmirnov faminjuredlibisis, by(localpolicepgtxt)
ksmirnov famkilledlibisis, by(localpolicepgtxt)
ksmirnov imprisonedlibisis, by(localpolicepgtxt)
ksmirnov fleehomelibisis, by(localpolicepgtxt)
ksmirnov homedestroyedlibisis, by(localpolicepgtxt)
ksmirnov womenabusedlibisis, by(localpolicepgtxt)

*Figure 10. ISIS Victimization During Liberation Across Treatment Groups
cibar addvictimlibisis, over1(txt2)
*Note additional formatting requires the "Figure 10 bar isis victimization liberation by txt.grec" file with the command graph play " Figure 10 bar isis victimization liberation by txt.grec"

*Treatment Effects With Coarsened Exact Matching on ISIS Victimization Pre-Liberation (OLS Regression)

cem addvictimlibisis, treatment(localpolicepgtxt)
reg revpostalpha ib3.txt##c.addvictimisis ib3.txt##c.addvictimlibisis [pweight=cem_weights], robust

*Kolmogorov Smirnov Balance Tests on Airstrike Victimization During Liberation

ksmirnov injuredlibair, by(powersharetxt)
ksmirnov faminjuredlibair, by(powersharetxt)
ksmirnov famkilledlibair, by(powersharetxt)
ksmirnov fleehomelibair, by(powersharetxt)
ksmirnov homedestroyedlibair, by(powersharetxt)

ksmirnov injuredlibair, by(hashdpgtxt)
ksmirnov faminjuredlibair, by(hashdpgtxt)
ksmirnov famkilledlibair, by(hashdpgtxt)
ksmirnov fleehomelibair, by(hashdpgtxt)
ksmirnov homedestroyedlibair, by(hashdpgtxt)

ksmirnov injuredlibair, by(localpolicepgtxt)
ksmirnov faminjuredlibair, by(localpolicepgtxt)
ksmirnov famkilledlibair, by(localpolicepgtxt)
ksmirnov fleehomelibair, by(localpolicepgtxt)
ksmirnov homedestroyedlibair, by(localpolicepgtxt)

*Figure 11. Airstrike Victimization by Treatment Group
cibar addvictimair, over1(txt2)
*Note additional formatting requires the "Figure 11 bar airstrike victimization by txt.grec" file with the command graph play " Figure 11 bar airstrike victimization by txt.grec"

*Treatment Effects With Coarsened Exact Matching on Airstrike Victimization During Liberation (OLS Regression)

cem addvictimair, treatment(localpolicepgtxt)
reg revpostalpha ib3.txt##c.addvictimair [pweight=cem_weights], robust

*Kolmogorov Smirnov Balance Tests on Crossfire Victimization During Liberation

ksmirnov crossfire, by(powersharetxt)
ksmirnov crossfire, by(hashdpgtxt)
ksmirnov crossfire, by(localpolicepgtxt)

*Figure 12. Crossfire Victimization by Treatment Group
cibar crossfire, over1(txt2)
*Note additional formatting requires the "Figure 12 crossfire victimization by txt.grec" file with the command graph play " Figure 12 crossfire victimization by txt.grec"

*Treatment Effects With Coarsened Exact Matching on Crossfire Victimization During Liberation (OLS Regression)

cem crossfire, treatment(localpolicepgtxt)
reg revpostalpha ib3.txt##c.crossfire [pweight=cem_weights], robust

*ISIS Victimization and Post-Traumatic Stress

*Relationship between Victimization and Fear/Anxiety (OLS regression).
*To generate victimization variable: 
*gen addvictimlibarmy = injuredlibarmy + faminjuredlibarmy + famkilledlibarmy + homedestroyedlibarmy + imprisonedlibarmy + fleehomelibarmy + lootedlibarmy + womenabusedlibarmy

reg afraid addvictimlibisis addvictimair addvictimlibarmy, robust
reg worried addvictimlibisis addvictimair addvictimlibarmy, robust
reg afraid addvictimisis, robust
reg worried addvictimisis, robust

*Demographic Correlates of Victimization (OLS Regression)

reg addvictimisis gender age education unemployed income i.religion i.ethnicity, robust
reg addvictimlibisis gender age education unemployed income i.religion i.ethnicity, robust
reg addvictimlibarmy gender age education unemployed income i.religion i.ethnicity, robust
reg addvictimair gender age education unemployed income i.religion i.ethnicity, robust
logit crossfire gender age education unemployed income i.religion i.ethnicity, robust

*Sectarian and Local/Non-Local Social Distance

reg revpostalpha ib3.txt, robust
reg revpostalpha ib3.txt revclosemosul revclosebaghdad, robust
reg revpostalpha ib3.txt revclosebaghdad revcloseshia, robust

*Cognizance of Baghdad/Shia majority status in Mosul

reg revpostalpha ib3.txt, robust
reg revpostalpha ib3.txt revbaghdadisshia revmosulissunni , robust

*Baghdad/Shia Intergroup Contact and Travel between Mosul and Baghdad

reg revpostalpha ib3.txt, robust
reg revpostalpha ib3.txt revcontactbaghdad traveltobaghdad, robust

*Emotional Mediators of Treatment Effects

*Emotions across Treatment Groups (Ordered Probit Regression)
oprobit afraid ib3.txt, robust
oprobit angry ib3.txt, robust
oprobit sad ib3.txt, robust
oprobit worried ib3.txt, robust
oprobit happy ib3.txt, robust
oprobit satisfied ib3.txt, robust

*Emotional Affect and Security
reg revpostalpha ib3.txt, robust
reg revpostalpha ib3.txt afraid angry sad worried happy satisfied, robust

reg revpostalpha ib3.txt afraid, robust
reg revpostalpha ib3.txt angry, robust
reg revpostalpha ib3.txt sad, robust
reg revpostalpha ib3.txt worried, robust
reg revpostalpha ib3.txt happy, robust
reg revpostalpha ib3.txt satisfied, robust

reg revpostalpha ib3.txt##c.afraid, robust
reg revpostalpha ib3.txt##c.angry, robust
reg revpostalpha ib3.txt##c.sad, robust
reg revpostalpha ib3.txt##c.worried, robust
reg revpostalpha ib3.txt##c.happy, robust
reg revpostalpha ib3.txt##c.satisfied, robust

*Material and Social-Psychological Motivations

reg revposteconomy ib3.txt##c.income, robust
reg revposteconomy ib3.txt##c.unemployed, robust

reg revpostalpha ib3.txt##c.revimportanceofethnicity i.ethnicity, robust
reg revpostalpha ib3.txt##c.revimportanceofreligion i.religion, robust

*Correlates of Power-sharing Support

*Figure 13. Support for Powersharing

histogram powershare, discrete percent addlabel
*Note additional formatting requires the "Figure 12 crossfire victimization by txt.grec" file with the command graph play " Figure 12 crossfire victimization by txt.grec"

*Correlates of Power-sharing Support
reg revpowershare addvictimisis gender age education ib8.typeofwork income i.religion i.ethnicity, robust
oprobit revpowershare addvictimisis gender age education ib8.typeofwork income i.religion i.ethnicity, robust

*Sample Size and Power Analysis

*Effect Size Estimations using One-War ANOVA (Sample Size)
power oneway, n(537) ngroups(3) power(0.80 0.90 0.95 0.99) graph

*Effect Size Estimation using One-Way ANOVA (N per treatment group)
power oneway, ngroups(3) n1(173) n2(175) n3(189) power(0.80 0.90 0.95 0.99)

*Cohen’s D for local police power grab txt relative to power-sharing
cohend revpostalpha localpolicepgtxt if hashdpgtxt~=1

log close
